package com.zxx.otherchaos.widgets.rickTip;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.TextView;

import com.zxx.otherchaos.R;

/**
 * @author zxx on 2020/12/31
 */
public class RickyAdapter extends BaseAdapter {

    private Context context;
    private int mNumDumies = 100;

    public RickyAdapter(Context context) {
        this.context = context;
    }

    @Override
    public int getCount() {
        return mNumDumies;
    }

    @Override
    public Object getItem(int position) {
        return position;
    }

    @Override
    public long getItemId(int position) {
        return position;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {
        if (convertView == null) {
            convertView = LayoutInflater.from(context).inflate(R.layout.item_list, parent, false);
        }
        TextView textView = convertView.findViewById(R.id.text1);
        textView.setText("" + position);
        return convertView;
    }
}
